package com.cssl.mapper;

import com.cssl.domain.DtsUser;
import com.cssl.domain.dto.UsersDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface DtsUserMapper {

    DtsUser login(@Param("userName") String name,@Param("password") String password);

    DtsUser weiXinLogin(@Param("openId")String openId,@Param("username") String username,@Param("password") String password);

    DtsUser findUserByPhone(@Param("mobile") String phone);

    int addUser(@Param("user") DtsUser user);

    List<DtsUser> getUserList(Map map);

    DtsUser getUserByPhone(String phone);

    DtsUser weiXinLoginByPwd(Map map);

    int resetPassword(@Param("phone") String phone, @Param("password") String password);

    List<DtsUser> getUsersList(UsersDto usersDto);
    //审批修改用户状态
    int UpdateStatus(@Param("uid") Integer uid);
    int getUsersCount();
    int updateUserLevel(@Param("num") int i, @Param("uId") Object userId);

    Integer saveSearch(@Param("keyword") String keyword, @Param("userId") Integer userId);

    Integer deleteHistory(Integer loginIdAsInt);
    Integer searchIsExist(@Param("id") Integer uid,@Param("keyword") String keyword);

    Integer userHasGoodsCollect(@Param("uId") Integer loginIdAsInt,@Param("gId") int parseInt);

    List<Map> getUserCommentById(Map map);

    void collectTrueOrFalse(@Param("flag") Integer flag, @Param("goodsId") Integer valueId,@Param("userId")Integer uid);

    Integer findCollect(@Param("userId")int loginIdAsInt,@Param("goodsId") Integer valueId);

    void insertCollect(@Param("flag") Integer flag, @Param("goodsId") Integer valueId,@Param("userId")Integer uid);

    Map getUserInfoByUid(Integer loginId);

    DtsUser weiXinLoginByName(@Param("code") String toString);
}
